Skip to content

archive: first use rename, if failed, use file.copy()+file.remove(), …#374

Merged
gaow merged 1 commit intoStatFunGen:mainfrom
al4225:main
Apr 10, 2025
Merged

archive: first use rename, if failed, use file.copy()+file.remove(), …#374
gaow merged 1 commit intoStatFunGen:mainfrom
al4225:main

Conversation

@al4225
Copy link
Copy Markdown
Collaborator

@al4225 al4225 commented Apr 10, 2025

archive: first use rename, if failed, use file.copy()+file.remove(), also message warnings.

In cloud environments, the source directory and target directory are often located on different file systems or partitions. When attempting to move files across different file systems using the file.rename() function, the operating system returns an "Invalid cross-device link" error. This occurs because the rename system call can only operate within the same file system, as it's designed to simply update directory entries rather than physically move data between storage devices.

@gaow
Copy link
Copy Markdown
Contributor

gaow commented Apr 10, 2025

I see! okay that makes sense. Then indeed you have to copy and delete. That seems the only way to work it with S3 bucket.

@gaow gaow merged commit 9d5ee5a into StatFunGen:main Apr 10, 2025
0 of 7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants